/*
 * This file is part of FinVis.
 *
 * FinVis is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * FinVis is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with FinVis.  If not, see <http://www.gnu.org/licenses/>
 *
 * @author Stephen Rudolph
 */

#ifndef FIN_WINDOW_H
#define FIN_WINDOW_H

#include <QMainWindow>
#include <QtGui>
#include <QUndoStack>

#include "FinInvestment.h"

class FinViewKey;
class FinList;
class FinView;
class FinInvestmentWidget;
class QAction;
class QTime;
class QToolBar;

class FinWindow : public QMainWindow
{
    Q_OBJECT

public:
    FinWindow();
    ~FinWindow();
private slots:
    void startScenario();
    void stopScenario();
    void addAndSelectInvestment();
    void removeSelectedInvestment();
    void investmentChanged(FinInvestment investment);
protected:
    void keyPressEvent(QKeyEvent *event);
private:
    void checkForExistingDatabase();
    QToolBar *viewToolBar, *controlToolBar;
    //Edit actions
    //QAction *addInvestmentAction;
    //QAction *removeInvestmentAction;
    //QAction *editInvestmentAction;
    //View actions
    QAction *showInvestmentListAction;
    QAction *zoomInAction;
    QAction *zoomOutAction;
    QAction *sampleAction;

    //Control actions
    QAction *playAction;
    QAction *stopAction;
    QAction *undoAction;
    QAction *redoAction;

    QTime evaluationTime;

    QUndoStack *undoStack;
    QDockWidget *miniDock;

    FinView *mainView, *miniView;//, *liquidAssetView;
    FinList *mainList;
    FinViewKey *viewKey;
    FinInvestmentWidget *investmentWidget;
};

#endif
